package com.cloudys.service.impl;

import com.cloudys.bean.TestUser;
import com.cloudys.dao.TestUserRepositoryDao;
import com.cloudys.service.TestUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class TestUserServiceImpl implements TestUserService {

    @Autowired
    private TestUserRepositoryDao testUserRepositoryDao;

    @Override
    public TestUser getTestUserByName(String name) {
        return testUserRepositoryDao.findUserByName(name);
    }

    @Override
    public TestUser saveUser(TestUser testUser) {
        return this.testUserRepositoryDao.save(testUser);
    }
}
